Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Passthrough #1156

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Conversation

electraminer
Copy link
Contributor

Previously, when two players attacked each other in quick succession, they would both recieve garbage.
This is because internet lag will cause both of them to send the garbage before they recieve it, so no cancellation occurs.
This is the same behavior Tetrio used to have.

I fixed this by storing sent attacks in a list, and attacks now also send the number of attacks their target has sent before them.
This allows me to keep track of which attacks have "crossed" each other, and cancel them out even after they have been sent.

This fix only applies to when 2 players are attacking each other, since in this case the behavior of garbage cancellation is very consistent. In cases where multiple players are attacking different players, the attacks will go past each other as before.

@ImpleLee
Copy link
Contributor

Is this pr still valid after #1180 has been merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants